# def func():
#     a = 1
#     return 0
#     return 1
#
# print(func())
# g = lambda x: 3
# print(g)
import random

# f = lambda x, y=8, z=8:x+y+z
# print(f(8))

# x = 3
# def demo():
#     x = 5
# demo()
# print(x)
# import math
# def factors(x):
#     y=int(math.sqrt(x))
#     for i in range(2,y+1):
#        if (x %i ==0):
#             print(i,end=' ');
#             factors(x//i)
#             break
#        else:
#            print(x,end=' ')
#     return
# factors(18)

# def demo(a, b, c=3, d=100):
#     return sum((a, b, c, d))
# print(demo(1, 2, 3, 4), end=',')
# print(demo(1, 2, d=3))

# def fun(a, *b):
#     n = 0
#     for i in b:
#         n += i
#     return n
#
#
# res = fun(1, 3, 5, 7)
# print(res)

# print(type(lambda:3))

# f=lambda x,y:x*y
# print(f(12,34))

# print(chr(65))

# def fun(x,y):
#     return x*y
# import functools
# print(functools.reduce(fun,[1,2,3,4,5]))

# def fun(x):
#     return x%2>0
# print(list(filter(fun,range(10))))

# number = random.randint(1, 50)
# print(number)

# s=[1,2,3,4,5]
# t=[n*n for n in s]
# print(t)

# s=[1,2,3,4,5]
# def square(x):
#     return x ** 2
# print(map(square, s))

# s=[1,2,3,4,5]
# def square(x):
#     return x ** 2
# print(list(map(square, s)))

# s=[1,2,3,4,5]
# print(list(map(lambda x:x*x, s)))

a = 20


# def func():
#     a = 40
#     print(a, end=" ")
#
#
# func()
# print(a)

# b,c=3,4
# def g_func():
#     a=b*c
#     b=b+1
#     d=a
#     print(a,b,end=" ")
# g_func()
# print(b,c)

# x = [1, 11, 111]
# x.sort(key=lambda x:len(str(x)),reverse=True)
# print(x)

# def func(x):
#     if x <= 1:
#         return 1
#     return x + func(x-2)
# print(func(9))

# f = lambda p:p+5
# t = lambda p:p*3
# x=7
# x=f(x)
# x=t(x)
# x=f(x)
# print(x)

# from functools import reduce
# print(reduce(lambda x,y: x*y, map(int, input().split())))


# def judge(m):
#     sum = 1
#     for i in range(1, m + 1):
#         sum *= i
#     return sum
#
#
# def cal(n, m):
#     now_n = judge(n)
#     now_m = judge(m)
#     now_n_m = judge(n - m)
#     return now_n / (now_m * now_n_m)
#
#
# m, n = list(input().split())
# flag = True
# flag2 = True
# try:
#     m, n = int(m), int(n)
# except:
#     print("请输入数值")
#     flag = False
# if flag:
#     if m > 0 and n > 0:
#         print("result={:.2f}".format(cal(n, m)))
#     else:
#         print("不能负数")

list = list(map(int, list(input())))
sum = sum(list)
print(sum)